Skip to content

Glossary: related terms link to the reader's language, not English (36 Turkish and German links) - #1197

Merged
LukasWallrich merged 2 commits into
rebrand-doorsfrom
glossary-related-local-first
Nov 19, 2026
Merged

LukasWallrich merged 2 commits into
rebrand-doorsfrom
glossary-related-local-first

Conversation

@LukasWallrich

@LukasWallrich LukasWallrich commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

On Turkish and German term pages, some related terms sent readers to the English page although their own language has the term. For example, Paywall on a Turkish page went to /glossary/english/paywall/ instead of the Turkish "Ödeme Duvarı (Paywall)".

The cause is the related-terms lookup, which finds a translated page only by the English name in its square brackets. The generator adds those brackets only when the translated title does not already contain the English words. Turkish titles often give the English name in round brackets ("CRediT (Katkı Rolleri Taksonomisi)", "Ödeme Duvarı (Paywall)"), and the German H-index page is titled "H-Index, Hirsch Index". So the English page won.

The template now also indexes every page by its en_title, which all glossary pages carry in their front matter. A translated page therefore wins over the English one for the same term.

Effect (hugo build of this branch compared with rebrand-doors)

  • Related-term links to the English page where a translation exists: 36 before (32 Turkish, 4 German), 0 after.
  • The related-terms lines on English, Arabic and Chinese pages are byte-identical. The number of unlinked related terms is unchanged in every language.
  • Links to English pages for terms a language really lacks (e.g. Turkish has no Trim-and-fill method) stay as they are.

Check: a new check 23 in scripts/check_seo_html.py fails when a translated glossary page links a related term to an English page whose hreflang links list a page in the same language. It fails on 36 links before this change, passes after, and has two unit tests. All 23 checks and check_sitemap_lastmod.py pass, as do the unit tests.

#1189 also edits the related-terms block of layouts/glossary/single.html, so whichever merges second may need a small rebase. The change here is one line in the $names loop.

Created with Claude Opus 5.5 in Claude Code.


Summary by cubic

Fixes related-term links on Turkish and German glossary pages so they point to the translated page when one exists rather than the English page. 36 links (32 Turkish, 4 German) now reach the translation; English, Arabic, and Chinese pages are byte-identical, and links to English pages for terms a language lacks stay as they are.

The related-terms lookup only matched the English name in square brackets, which translated titles carry only when they don't already contain the English words — Turkish titles use round brackets ("Ödeme Duvarı (Paywall)") and the German H-index page is titled "H-Index, Hirsch Index". The template now also indexes each page by the en_title in its front matter, so a translated page wins over the English one for the same term.

Adds check 23 to scripts/check_seo_html.py that fails when a translated glossary page links a related term to an English page whose hreflang links list a page in the same language, with three unit tests. The checker follows the redesigned related-terms section from #1189 and ignores a preview URL prefix. This branch touches the same related-terms block as #1189; whichever merges second needs a small rebase — the change here is one line in the $names loop.

Written for commit 5ec8947. Summary will update on new commits.

View guided diff Turn on auto-fix

@LukasWallrich
LukasWallrich requested a review from a team as a code owner November 17, 2026 18:05
@github-actions

Copy link
Copy Markdown
Contributor

👍 All image files/references (if any) are in webp format, in line with our policy.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Spell Check Passed

No spelling issues found when checking 3 changed file(s)! 🎉

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 3 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="scripts/check_seo_html.py">

<violation number="1" location="scripts/check_seo_html.py:296">
P2: Check 23 is not base-URL aware, so the rebrand preview silently misses every translated related-term link: its English keys omit `/rebrand-doors/`, while the parsed target and hreflang paths include it. Normalize both sides from canonical URLs or strip the build prefix consistently before matching.</violation>
</file>

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread scripts/check_seo_html.py Resolved
@LukasWallrich
LukasWallrich force-pushed the glossary-related-local-first branch from 76a5f55 to 70bf712 Compare November 19, 2026 14:35
LukasWallrich and others added 2 commits November 19, 2026 14:44
Translated titles carry the English name in square brackets only when they
do not already contain the English words, so pages such as Turkish
'Ödeme Duvarı (Paywall)' were found only under their English page. Index
every page by its en_title too. Adds check 23 to check_seo_html.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…review prefix

After #1189 the related terms sit in section.term-related as cards, so the
parser now tracks whichever element carries that class. Glossary URLs are
compared from /glossary/ on, so a build served under /rebrand-doors/ is
checked too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@LukasWallrich
LukasWallrich force-pushed the glossary-related-local-first branch from 70bf712 to 5ec8947 Compare November 19, 2026 14:45
@LukasWallrich
LukasWallrich merged commit 5878643 into rebrand-doors Nov 19, 2026
9 checks passed
@LukasWallrich
LukasWallrich deleted the glossary-related-local-first branch November 19, 2026 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant